import { Injectable, ErrorHandler } from '@angular/core';

import { Events } from './events';


@Injectable()
export class ErrorHandlerNew implements ErrorHandler{

	constructor(
		private	events:Events
	){
	}


  //401错误时,发送登录通讯
  handleError(err:any):void{
			console.log(err)
  	if(err.status === 401){
  		this.events.publish('signin');
  	}
  }





}